/*
 * XML Type:  CreditcardRequestMessageSetV1
 * Namespace: http://ofx.net/types/2003/04
 * Java type: net.ofx.types.x2003.x04.CreditcardRequestMessageSetV1
 *
 * Automatically generated - do not modify.
 */
package net.ofx.types.x2003.x04.impl;
/**
 * An XML CreditcardRequestMessageSetV1(@http://ofx.net/types/2003/04).
 *
 * This is a complex type.
 */
public class CreditcardRequestMessageSetV1Impl extends net.ofx.types.x2003.x04.impl.AbstractRequestMessageSetImpl implements net.ofx.types.x2003.x04.CreditcardRequestMessageSetV1
{
    
    public CreditcardRequestMessageSetV1Impl(org.apache.xmlbeans.SchemaType sType)
    {
        super(sType);
    }
    
    private static final javax.xml.namespace.QName CCSTMTTRNRQ$0 = 
        new javax.xml.namespace.QName("", "CCSTMTTRNRQ");
    private static final javax.xml.namespace.QName CCSTMTENDTRNRQ$2 = 
        new javax.xml.namespace.QName("", "CCSTMTENDTRNRQ");
    
    
    /**
     * Gets array of all "CCSTMTTRNRQ" elements
     */
    public net.ofx.types.x2003.x04.CreditCardStatementTransactionRequest[] getCCSTMTTRNRQArray()
    {
        synchronized (monitor())
        {
            check_orphaned();
            java.util.List targetList = new java.util.ArrayList();
            get_store().find_all_element_users(CCSTMTTRNRQ$0, targetList);
            net.ofx.types.x2003.x04.CreditCardStatementTransactionRequest[] result = new net.ofx.types.x2003.x04.CreditCardStatementTransactionRequest[targetList.size()];
            targetList.toArray(result);
            return result;
        }
    }
    
    /**
     * Gets ith "CCSTMTTRNRQ" element
     */
    public net.ofx.types.x2003.x04.CreditCardStatementTransactionRequest getCCSTMTTRNRQArray(int i)
    {
        synchronized (monitor())
        {
            check_orphaned();
            net.ofx.types.x2003.x04.CreditCardStatementTransactionRequest target = null;
            target = (net.ofx.types.x2003.x04.CreditCardStatementTransactionRequest)get_store().find_element_user(CCSTMTTRNRQ$0, i);
            if (target == null)
            {
                throw new IndexOutOfBoundsException();
            }
            return target;
        }
    }
    
    /**
     * Returns number of "CCSTMTTRNRQ" element
     */
    public int sizeOfCCSTMTTRNRQArray()
    {
        synchronized (monitor())
        {
            check_orphaned();
            return get_store().count_elements(CCSTMTTRNRQ$0);
        }
    }
    
    /**
     * Sets array of all "CCSTMTTRNRQ" element
     */
    public void setCCSTMTTRNRQArray(net.ofx.types.x2003.x04.CreditCardStatementTransactionRequest[] ccstmttrnrqArray)
    {
        synchronized (monitor())
        {
            check_orphaned();
            arraySetterHelper(ccstmttrnrqArray, CCSTMTTRNRQ$0);
        }
    }
    
    /**
     * Sets ith "CCSTMTTRNRQ" element
     */
    public void setCCSTMTTRNRQArray(int i, net.ofx.types.x2003.x04.CreditCardStatementTransactionRequest ccstmttrnrq)
    {
        synchronized (monitor())
        {
            check_orphaned();
            net.ofx.types.x2003.x04.CreditCardStatementTransactionRequest target = null;
            target = (net.ofx.types.x2003.x04.CreditCardStatementTransactionRequest)get_store().find_element_user(CCSTMTTRNRQ$0, i);
            if (target == null)
            {
                throw new IndexOutOfBoundsException();
            }
            target.set(ccstmttrnrq);
        }
    }
    
    /**
     * Inserts and returns a new empty value (as xml) as the ith "CCSTMTTRNRQ" element
     */
    public net.ofx.types.x2003.x04.CreditCardStatementTransactionRequest insertNewCCSTMTTRNRQ(int i)
    {
        synchronized (monitor())
        {
            check_orphaned();
            net.ofx.types.x2003.x04.CreditCardStatementTransactionRequest target = null;
            target = (net.ofx.types.x2003.x04.CreditCardStatementTransactionRequest)get_store().insert_element_user(CCSTMTTRNRQ$0, i);
            return target;
        }
    }
    
    /**
     * Appends and returns a new empty value (as xml) as the last "CCSTMTTRNRQ" element
     */
    public net.ofx.types.x2003.x04.CreditCardStatementTransactionRequest addNewCCSTMTTRNRQ()
    {
        synchronized (monitor())
        {
            check_orphaned();
            net.ofx.types.x2003.x04.CreditCardStatementTransactionRequest target = null;
            target = (net.ofx.types.x2003.x04.CreditCardStatementTransactionRequest)get_store().add_element_user(CCSTMTTRNRQ$0);
            return target;
        }
    }
    
    /**
     * Removes the ith "CCSTMTTRNRQ" element
     */
    public void removeCCSTMTTRNRQ(int i)
    {
        synchronized (monitor())
        {
            check_orphaned();
            get_store().remove_element(CCSTMTTRNRQ$0, i);
        }
    }
    
    /**
     * Gets array of all "CCSTMTENDTRNRQ" elements
     */
    public net.ofx.types.x2003.x04.CreditCardStatementEndTransactionRequest[] getCCSTMTENDTRNRQArray()
    {
        synchronized (monitor())
        {
            check_orphaned();
            java.util.List targetList = new java.util.ArrayList();
            get_store().find_all_element_users(CCSTMTENDTRNRQ$2, targetList);
            net.ofx.types.x2003.x04.CreditCardStatementEndTransactionRequest[] result = new net.ofx.types.x2003.x04.CreditCardStatementEndTransactionRequest[targetList.size()];
            targetList.toArray(result);
            return result;
        }
    }
    
    /**
     * Gets ith "CCSTMTENDTRNRQ" element
     */
    public net.ofx.types.x2003.x04.CreditCardStatementEndTransactionRequest getCCSTMTENDTRNRQArray(int i)
    {
        synchronized (monitor())
        {
            check_orphaned();
            net.ofx.types.x2003.x04.CreditCardStatementEndTransactionRequest target = null;
            target = (net.ofx.types.x2003.x04.CreditCardStatementEndTransactionRequest)get_store().find_element_user(CCSTMTENDTRNRQ$2, i);
            if (target == null)
            {
                throw new IndexOutOfBoundsException();
            }
            return target;
        }
    }
    
    /**
     * Returns number of "CCSTMTENDTRNRQ" element
     */
    public int sizeOfCCSTMTENDTRNRQArray()
    {
        synchronized (monitor())
        {
            check_orphaned();
            return get_store().count_elements(CCSTMTENDTRNRQ$2);
        }
    }
    
    /**
     * Sets array of all "CCSTMTENDTRNRQ" element
     */
    public void setCCSTMTENDTRNRQArray(net.ofx.types.x2003.x04.CreditCardStatementEndTransactionRequest[] ccstmtendtrnrqArray)
    {
        synchronized (monitor())
        {
            check_orphaned();
            arraySetterHelper(ccstmtendtrnrqArray, CCSTMTENDTRNRQ$2);
        }
    }
    
    /**
     * Sets ith "CCSTMTENDTRNRQ" element
     */
    public void setCCSTMTENDTRNRQArray(int i, net.ofx.types.x2003.x04.CreditCardStatementEndTransactionRequest ccstmtendtrnrq)
    {
        synchronized (monitor())
        {
            check_orphaned();
            net.ofx.types.x2003.x04.CreditCardStatementEndTransactionRequest target = null;
            target = (net.ofx.types.x2003.x04.CreditCardStatementEndTransactionRequest)get_store().find_element_user(CCSTMTENDTRNRQ$2, i);
            if (target == null)
            {
                throw new IndexOutOfBoundsException();
            }
            target.set(ccstmtendtrnrq);
        }
    }
    
    /**
     * Inserts and returns a new empty value (as xml) as the ith "CCSTMTENDTRNRQ" element
     */
    public net.ofx.types.x2003.x04.CreditCardStatementEndTransactionRequest insertNewCCSTMTENDTRNRQ(int i)
    {
        synchronized (monitor())
        {
            check_orphaned();
            net.ofx.types.x2003.x04.CreditCardStatementEndTransactionRequest target = null;
            target = (net.ofx.types.x2003.x04.CreditCardStatementEndTransactionRequest)get_store().insert_element_user(CCSTMTENDTRNRQ$2, i);
            return target;
        }
    }
    
    /**
     * Appends and returns a new empty value (as xml) as the last "CCSTMTENDTRNRQ" element
     */
    public net.ofx.types.x2003.x04.CreditCardStatementEndTransactionRequest addNewCCSTMTENDTRNRQ()
    {
        synchronized (monitor())
        {
            check_orphaned();
            net.ofx.types.x2003.x04.CreditCardStatementEndTransactionRequest target = null;
            target = (net.ofx.types.x2003.x04.CreditCardStatementEndTransactionRequest)get_store().add_element_user(CCSTMTENDTRNRQ$2);
            return target;
        }
    }
    
    /**
     * Removes the ith "CCSTMTENDTRNRQ" element
     */
    public void removeCCSTMTENDTRNRQ(int i)
    {
        synchronized (monitor())
        {
            check_orphaned();
            get_store().remove_element(CCSTMTENDTRNRQ$2, i);
        }
    }
}
